<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script type="text/javascript">

    function SuperType(name) {
        this.name = name
    }
    function SubType() {
        // 继承了SuperType
        SuperType.call(this, 'mary')    // 这里的this就是实例对象
        this.age = 25
    }
    var instance = new SubType()
    console.log(instance.name)
    console.log(instance.age)

</script>

</body>
</html>
